package main

import "fmt"

// 结构体定义

type Student struct {
	id   int
	name string
	age  int
	addr string
}

func main() {
	var s = Student{1, "张三", 18, "北京"}
	fmt.Println(s)

	var s1 = Student{name: "李四", age: 18}
	fmt.Println(s1)

	var s2 Student
	s2.id = 102
	s2.addr = "北京"
	s2.age = 18
	s2.name = "老王"
	fmt.Println(s2)
}
